//
//  WJBaseImageView.m
//  WJBSApp
//
//  Created by dllo on 16/7/13.
//  Copyright © 2016年 王景伟. All rights reserved.
//
// 没有用了这个

#import "WJBaseImageView.h"

@implementation WJBaseImageView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    [self changeColor];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeColor) name:@"changeColor" object:nil];
    return self;
}

//通知方法
- (void)changeColor {
    if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"Mode"] isEqualToString:@"night"]) {
        self.backgroundColor = FIRBLACKCOLOR;
    } else {
        self.backgroundColor = LABLECOLOR;
    }
}
//重写dealloc 删除通知
- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"changeColor" object:nil];
}

@end
